#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
    int n = 0;
    scanf("%d", &n);
    int i = 1;
    long sum = 0;
    int t = 1;
    for (i = 1; i <= n; i++)
    {
        sum += t;
        t = t * 10 + i + 1;
    }
    printf("%ld\n", sum);
    return 0;
}